extends "../z46-1/z46-1.gd"

func _extInit():
	._extInit()
	lv = 2
	addSkill("每{cd}秒对当前目标周围2格的敌人发射震荡波，造成[雷击*1]的可暴击技能伤害，每道震荡波会向周围(九宫格范围)进行弹射，造成等额伤害", "回音击", "z462", 12)
var p2 = 1
var p4 = 0.08
var czdFlag = false
func _castCdSkill(id):
	._castCdSkill(id)
	if id == "z462":
		z462()

func z462(cha = aiCha):
	var dmg = att.mgiAtk*1
	if czdFlag:
		var addiDmg = cha.att.maxHp*p4
		if cha.type == sys.CharaClass.BOSS:
			addiDmg *= 0.2
		dmg += addiDmg
	for i in getCellChas(cha.cell, 2, 1):
		azurHurtChara(i, dmg, sys.HurtType.WEAPON, sys.AtkType.SKILL, "回音击", true, p2)
		for j in getAroundChas(i.cell, false):
			if j == i:continue
			azurHurtChara(i, dmg, sys.HurtType.WEAPON, sys.AtkType.SKILL, "回音击", true, p2)